<el-aside width="200px" style="background-color: rgb(238, 241, 246); color: #333; min-height: 600px;">
    <div style="display: flex; align-items: center; justify-content: center; height: 50px; background-color: #fff;">蓁奕科技</div>
    <el-menu :default-openeds="['1', '2', '3', '4', '5']" default-active="${menuIndex!}">
        <#if hasPermission('MODEL_PRODUCT')>
            <el-submenu index="1" v-if="${userRole!2} != 4">
                <template slot="title"><i class="el-icon-document"></i>商品</template>
                <#if hasPermission('MENU_ITEM')>
                    <a href="/yq/admin/item/list" v-if="${userRole!2} === 0 || ${userRole!2} === 1"><el-menu-item index="1-1">有趣</el-menu-item></a>
                </#if>
                <#if hasPermission('MENU_PRODUCT')>
                    <a href="/yq/admin/product/list" v-if="${userRole!2} === 0 || ${userRole!2} === 1 || ${userRole!2} === 2"><el-menu-item index="1-2">商品</el-menu-item></a>
                </#if>
                <#if hasPermission('MENU_CATEGORY')>
                    <a href="/yq/admin/category/list" v-if="${userRole!2} === 0 || ${userRole!2} === 1"><el-menu-item index="1-3">商店类目</el-menu-item></a>
                </#if>
            </el-submenu>
        </#if>
        <#if hasPermission('MODEL_ORDER')>
            <el-submenu index="2">
                <template slot="title"><i class="el-icon-document"></i>订单</template>
                <#if hasPermission('MENU_ORDER')>
                    <a href="/yq/admin/order/list" v-if="${userRole!2} === 0 || ${userRole!2} === 1 || ${userRole!2} === 2"><el-menu-item index="2-1">订单</el-menu-item></a>
                </#if>
                <#if hasPermission('MENU_RECORD')>
                    <!-- <a href="/yq/admin/group/list"><el-menu-item index="2-2">团购列表</el-menu-item></a> -->
                    <a href="/yq/admin/order/recordList" v-if="${userRole!2} === 0 || ${userRole!2} === 1 || ${userRole!2} === 2 || ${userRole!2} === 4"><el-menu-item index="2-3">扫码/核销记录</el-menu-item></a>
                </#if>
            </el-submenu>
        </#if>
        <#if hasPermission('MODEL_USER')>
            <el-submenu index="3" v-if="${userRole!2} === 0 || ${userRole!2} === 1">
                <template slot="title"><i class="el-icon-document"></i>用户</template>
                <#if hasPermission('MENU_USER')>
                    <a href="/yq/admin/user/list"><el-menu-item index="3-1">列表</el-menu-item></a>
                </#if>
            </el-submenu>
        </#if>
        <#if hasPermission('MODEL_SHOP')>
            <el-submenu index="4" v-if="${userRole!2} != 4">
                <template slot="title"><i class="el-icon-document"></i>商户</template>
                <#if hasPermission('MENU_SHOP')>
                    <a href="/yq/admin/shop/list" v-if="${userRole!2} === 0 || ${userRole!2} === 1"><el-menu-item index="4-1">列表</el-menu-item></a>
                </#if>
                <#if hasPermission('MENU_SHOP_USER')>
                    <a href="/yq/admin/shopUser/list" v-if="${userRole!2} === 0 || ${userRole!2} === 2"><el-menu-item index="4-2">账号</el-menu-item></a>
                </#if>
            </el-submenu>
        </#if>
        <#if hasPermission('MODEL_MODEL')>
            <el-submenu index="5" v-if="${userRole!2} === 0">
                <template slot="title"><i class="el-icon-document"></i>模块</template>
                <#if hasPermission('MENU_MODEL')>
                    <a href="/yq/admin/model/list"><el-menu-item index="5-1">列表</el-menu-item></a>
                </#if>
            </el-submenu>
        </#if>
    </el-menu>
</el-aside>